function getUrlParam(sUrl, sKey) {
    var result = {}
    sUrl.replace(/(\w+)=(\w+)(?=[&|#])/g, function (ele, key, val) {
        if (!result[key]) {
            result[key] = val
        } else {
            var temp = result[key]
            result[key] = [].concat(temp, val)
        }
    })
    if (!sKey) {
        return result
    } else {
        return result[sKey] || ''
    }
}
